/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import Facade.StatementFacadeLocal;
import entity.StatementAccount;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.EJB;
import util.JsfUtil;

/**
 *
 * @author Vojtisek
 */
public class StatementAccountManagedBean {

    @EJB
    private StatementFacadeLocal statementFacadeBean;
    private static final Logger logger = Logger.getLogger("StatementAccountManagedBean");

    public Collection<StatementAccount> getAll() {
        try {
            return statementFacadeBean.findAll();
        } catch (Exception ex) {
            JsfUtil.ensureAddErrorMessage(ex, "Persistance error");
            logger.log(Level.SEVERE, ex.getMessage(), ex);
        }
        return null;
    }
}
